package com.onesports.intelligent.k12.polarlight.domain.dto.student;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.onesports.intelligent.k12.polarlight.domain.dto.common.BasePageDTO;
import com.onesports.intelligent.k12.polarlight.enums.ClassInfoStatusEnum;
import com.onesports.intelligent.k12.polarlight.security.SecurityUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @author Wsy
 **/
@Data
@ApiModel("考勤管理QueryDTO")
public class AttendanceQueryDTO extends BasePageDTO {

    @ApiModelProperty("校区id")
    private String campusId;

    @ApiModelProperty("班级名称")
    private String className;

    @ApiModelProperty("上课开始日期(yyyy-MM-dd)")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    @ApiModelProperty("上课结束日期(yyyy-MM-dd)")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    @ApiModelProperty("上课开始时间(HH:mm)")
    @JsonFormat(pattern = "HH:mm")
    @DateTimeFormat(pattern = "HH:mm")
    private Date startTime;

    @ApiModelProperty("上课结束时间(HH:mm)")
    @JsonFormat(pattern = "HH:mm")
    @DateTimeFormat(pattern = "HH:mm")
    private Date endTime;

    @ApiModelProperty("教练id")
    private String coachId;

    @ApiModelProperty("考勤状态1：未拼班    2：待考勤   3：考勤中 4：已考勤  5：作废")
    private String status;

    @ApiModelProperty(hidden = true)
    private List<String> campusIds = SecurityUtils.getCampusIds();

    @ApiModelProperty(hidden = true)
    private List<String> classStatusList = Arrays.asList(ClassInfoStatusEnum.IN_CLASS.getValue(),ClassInfoStatusEnum.FAIL_CLASS.getValue(),
            ClassInfoStatusEnum.DISSOLVE_CLASS_COLONEL.getValue());
}
